form method = 'get'
  .well
    .row
      .col-md-4
        | 工单号：#{@order_beauty.code}    
      .col-md-4
        | 客户姓名：#{@order_beauty.customer.name}
      .col-md-4
        | 客户级别：#{@order_beauty.customer.customer_level.name}
    .row
      .col-md-4
        | 车型：#{@order_beauty.customer.car_mo}    
      .col-md-4
        | 车牌号：#{@order_beauty.customer.car_num}
      .col-md-4
        | 状态：#{@order_beauty.status}
    .row
      .col-md-4
        | 等待时间：#{@dtime} 

  .panel.panel-default
    .panel-heading
      input type='text' value=params[:id] name='id' hidden=true
      select.form-control name="staff" style="width:100px"
	    - @staffs.each do |s|
	          option value="#{s.id}" = "#{s.name}"
    .panel-body
      | 美容项目
      .table-responsive
        table.table.table-bordered.table-hover
          tr
            th 项目名称
            th 服务人员
            th 工时
            th 价格
            th 数量
            th 小计
            th 状态
            th 操作

          - @order_beauty.order_beauty_items.each do |i|
            tr
              td = i.beauty_item.name
              td
                - i.staffs.each do |s|
                  span class="label label-success" #{s.name}
              td = i.beauty_item.working_hour
              td = i.beauty_item.amount
              td = i.qty
              td = i.sub_total
              td = i.status
              td
                button type='submit' name='add' value=i.id class="btn btn-primary btn-xs glyphicon glyphicon-plus" style="margin-right:10px;"
                button type='submit' name='refresh' value=i.id class="btn btn-danger btn-xs glyphicon glyphicon-refresh" style="margin-right:10px;"
                - if i.status == '未服务'
                  button type='submit' name='start' value=i.id class="btn btn-warning btn-xs" 开始 
                - elsif i.status == '服务中'
                  button type='submit' name='over' value=i.id class="btn btn-danger btn-xs" 结束 

      | 美容配件
      .table-responsive
        table.table.table-bordered.table-hover
          tr
            th 配件编号
            th 配件名称
            th 数量
            th 单位
            th 单价
            th 小计

          - @order_beauty.order_beauty_parts.each do |p|
            tr
              td = p.part.code
              td = p.part.name
              td = p.qty
              td = p.part.unit
              td = p.part.purchase_price
              td = p.sub_total

  - if @order_beauty_unfinish.blank?
    button type='submit' class="btn btn-warning btn-lg btn-block" name='finish' data={confirm: '确定完成？'} 完成服务

         
         
          